package com.cenwangkeji.zhihuimuye.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;


import com.cenwangkeji.zhihuimuye.R;
import com.cenwangkeji.zhihuimuye.model.bean.StatisticsBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @松 on 2019/7/18 09:50
 *
 */
public class StatisticsAdapter extends BaseQuickAdapter <StatisticsBean,BaseViewHolder>{
    public StatisticsAdapter(@Nullable List<StatisticsBean> data) {
        super(R.layout.item_statistics_fragment, data);
    }

    @Override
    protected void convert(BaseViewHolder helper,StatisticsBean item) {
        ImageView iv = helper.getView(R.id.iv);
        iv.setImageResource(item.getIcon());
        helper.setText(R.id.tv_name, item.getName());
    }
}
